{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e2f3e9ba",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Before running this notebook, select Runtime version 2025.07 in order to get Python 3.11, 3.12 is not supported and likely is not going to be supported for a long time.\n",
    "# Must be 3.11:\n",
    "!python --version"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "Omt6xz6ljwIR",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "Omt6xz6ljwIR",
    "outputId": "89fb352e-84a8-4d3e-b0dc-28ee9d9a3e6e"
   },
   "outputs": [],
   "source": [
    "!git clone https://github.com/rsxdalv/tts-webui\n",
    "\n",
    "import os\n",
    "os.chdir(\"./tts-webui\")\n",
    "\n",
    "!pip install torch==2.6.0 torchvision torchaudio xformers==0.0.29.post3 --extra-index-url https://download.pytorch.org/whl/cu124 -r requirements.txt\n",
    "\n",
    "# Optional: install typical extensions\n",
    "# !pip install tts-webui-extension.bark_voice_clone>=0.0.1 --extra-index-url https://tts-webui.github.io/extensions-index/\n",
    "# !pip install tts-webui-extension.rvc>=0.0.3 --extra-index-url https://tts-webui.github.io/extensions-index/\n",
    "# !pip install tts-webui-extension.styletts2>=0.1.0 --extra-index-url https://tts-webui.github.io/extensions-index/\n",
    "# !pip install tts-webui-extension.stable_audio>=0.1.1 --extra-index-url https://tts-webui.github.io/extensions-index/\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "r0FihjXLklZG",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "r0FihjXLklZG",
    "outputId": "77b5030b-2d12-4c20-ab0d-970b53b9ac08"
   },
   "outputs": [],
   "source": [
    "# Start the App\n",
    "!python server.py --share\n",
    "# Note - Node.js/React UI works but isn't accesssible by default on Google Colab, only gradio is easy to open."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f9bc1c3b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Extension Manager\n",
    "!python tools/extension_manager.py --share"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
